<?php
class template_edit extends theme
{
	
	protected function head()
	{
	?>
<link type="text/css" rel="stylesheet" href="templates/user/css/edit.css">
<script type="text/javascript" language="javascript" src="templates/user/js/edit.js"></script>
	<?php
	}

	protected function center()
	{
		$user = $this->get('user');
		?>
<p class="center-title"><?php echo $this->get_title(); ?></p>


<div class="center-content">
<?php $this->message(); ?>


<form action="./" method="post" enctype="multipart/form-data">

<table class="edit-table">

<tr>
<td class="key">用户名</td>
<td>
	<?php echo $user->username; ?>
</td>
</tr>

<tr>
<td class="key">邮箱</td>
<td>
	<?php echo $user->email; ?>
</td>
</tr>

<tr>
<td class="key">名字</td>
<td>
	<input type="text" name="name" id="name" value="<?php echo $user->name; ?>" size="15" maxlength="30" />
</td>
</tr>

<tr>
<td class="key">头像<br /><small>(最佳分辩率: 64x64像素)</small></td>
<td>
	<img src="storage/avatar/<?php echo $user->avatar.'?_='.rand(); ?>">
	<input type="file" name="avatar" />	
</td>
</tr>

<tr>
<td class="key">电话</td>
<td>
	<input type="text" name="phone" id="phone" value="<?php echo $user->phone; ?>" size="20" maxlength="20" />
</td>
</tr>

<tr>
<td class="key">手机</td>
<td>
	<input type="text" name="mobile" id="mobile" value="<?php echo $user->mobile; ?>" size="20" maxlength="20" />
</td>
</tr>

<tr>
<td class="key">QQ</td>
<td>
	<input type="text" name="qq" id="qq" value="<?php echo $user->qq; ?>" size="20" maxlength="20" />
</td>
</tr>

<tr>
<td class="key">淘宝旺旺</td>
<td>
	<input type="text" name="wangwang" id="wangwang" value="<?php echo $user->wangwang; ?>" size="30" maxlength="60" />
</td>
</tr>

<tr>
<td class="key">Google Talk</td>
<td>
	<input type="text" name="gtalk" id="gtalk" value="<?php echo $user->gtalk; ?>" size="30" maxlength="60" />
</td>
</tr>


<tr>
<td></td>
<td>
	<input type="submit" value="保存"/>
</td>
</tr>

</table>

<input type="hidden" name="controller" value="user" />
<input type="hidden" name="task" value="edit_save" />
</form>
</div>
		<?php
	}		
		

}
?>